package org.hq.video.pojo;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.User;
import java.util.Collection;
import java.util.List;

/**
 * 自定义登录系统用户
 */

public class LoginUser extends User{
    private WebUser user;

    public LoginUser(WebUser user) {
        super(user.getUserid(),user.getPassword(),AuthorityUtils.commaSeparatedStringToAuthorityList(user.getGranted()));
        this.user = user;

    }

    public WebUser getUser() {
        return user;
    }


}
